<%@ page contentType="text/html;charset=UTF-8" %> 
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
   
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
    
    <script type="text/javascript">
    
	 $(document).ready(function(){
		 $(".showHtml").find("input,select,textarea").attr("disabled","disabled");
		 var form = $("#inputForm");  
	        form.validate();//验证指定的表单
	        	/* $("#customerCategoryCD").select2();
	       	 	$("#customerLevelCD").select2(); */
	       	 	$("#companyCountry").select2();
	       		$("#companyCity").select2();
	        
	        	$("#okButton").click(function(){
	        		if (form.valid()) {//如果表单验证成功，则进行提交。  
	        		$("#showHtml").addClass("showHtml");
	                $("#okHead").show();
	                $("#createHead").hide();
	                $("#operateP").hide();
	                $('tr').find('td:eq(0)').hide();
	                $("tr").children('th').eq(0).hide();	
	            
	                return false;
	              }
	         });
	        	 
	    });
	 
	 
	    //删除方法
	    function delDict(){
	          // 调用后台删除方法
	        $.post("${ctx}/database/message/deleteALL?itemCode=${dict.itemCode}&&oldItemValue=${dict.oldItemValue}",'',function(result){
	             // 提示信息
	             tipParent(result.message);
	             // 返回状态
	            if(result.statusCode==STATUSCODEOK){
	            	// 刷新页面
                    window.parent.frames[0].searchListForm();
	                 // 关闭页面
	                closeWin(); 
	             }
	        },'json');
	   }
	 



    </script>
</head>
<body>   
<form id="inputForm" name="inputForm">
<!-- 创建编辑头部 -->

<div id="createHead" class="layerHeader clearfix">
<p class="headerTitle"><spring:message code="dict_show"/></p>
    <div class="headerButton clearfix">
            <!-- 编辑 -->
	        <shiro:hasPermission name="database:message:edit">
	        <button type="button" onClick="window.location.href='${ctx}/database/message/form?id=${dict.id}&&oldItemValue=${dict.oldItemValue}'" >
	               <spring:message code="dict_edit" />
	        </button>
	        
            <!-- 删除 -->
            <button type="button" onclick="del(delDict)"><spring:message code="btn_delete"/></button>
            </shiro:hasPermission>
        <!-- 取消 -->
        <button type="button" onclick="closeWin()"><spring:message code="company_edit_cancle"/></button>
    </div>
</div>
<!-- 入力框 -->

<div id="showHtml" class="tabBoxSm showHtml" >
    <div class="tabSm smOrderBox">
        <div class="clearfix">
    	<input type="hidden" id="createDate" name="createDate" value="${fns:getDate('yyyy-MM-dd HH:mm')}">
    	<input type="hidden" id="createID" name="createID" value="${fns:getUser()}">
    	<input type="hidden" id="companyID" name="companyID" value="${companyList.companyID}">
        <input type="hidden" id="editFlag" name="editFlag" value="${companyList.editFlag}">
        	<div class="">
        	<div class="col-50 items clearfix">
        	</div>
                <!--  数据代码  -->
                <div class="col-50 items clearfix ">
                	<p class="tit"><spring:message code="dict_itemCode"/></p>
                    <input id="itemCode" name="itemCode"  style="margin-left: 30px" value="${dictListFind[0].itemCode}" data-rule-required="true" data-msg-required="<spring:message code="company_edit_err_msg_companyShortName"/>">
                    <p class="haveTo">*</p>
                </div>
            </div>
            <div class="">
        	   <!--  中文全称： -->
            	<div class="col-50 items clearfix">
                	<p class="tit"><spring:message code="fitproperty_Cn_show"/></p>
                    <input id="itemNameCn" name="itemNameCn" style="border: none;color: #333;background-color: inherit;margin-left: 30px" disabled="true" value="${dictListFind[0].itemNameCn}" >
                </div>
                 <!--  英文全称-->
                <div class="col-50 items clearfix haveToBox">
                	<p class="tit"><spring:message code="fitproperty_En"/></p>
                    <input id="itemNameEn" name="itemNameEn" style="margin-left: 30px" value="${dictListFind[0].itemNameEn}" data-rule-required="true" data-msg-required="<spring:message code="company_edit_err_msg_companyShortName"/>">
                </div>
            </div>
            <div class="">
               <!--  日文全称 -->
                <div class="col-50 items clearfix haveToBox">
                	<p class="tit"><spring:message code="fitproperty_Jp_show"/></p>
                    <input id="itemNameJp" name="itemNameJp" style="margin-left: 30px" maxlength="50" value="${dictListFind[0].itemNameJp}" data-rule-required="true" data-msg-required="<spring:message code="company_edit_err_msg_companyName"/>">
                </div>
                <!--  描述-->
                <div class="col-50 items clearfix haveToBox" >
                	<p class="tit" ><spring:message code="describe_remark"/></p>
                	<label style="margin-left: 30px"></label>
                	   <c:forEach items="${dictList}" var="dict" varStatus="status" begin="0" end="2" step="1">
                    <label ><c:if test="${status.index!=0 }">/</c:if>${dictList[status.index].itemNameCn}
                </c:forEach>
                    <c:if test="${dictList.size()>3 }">......</c:if>
                    </label>
                </div>
            </div>
        </div> 
	</div>
	<!-- 银行账户信息 -->
    <div class="">
    	<div class="tableArea">
			<div class="">
				<div style="float: left;margin-left: 10px">
				<p class="tit"><spring:message code="fitproperty_sub_show_aaa"/></p>
				</div>
				<div style="float: right;"> 
				</div>
			</div>
			
        	<div class="tableScroll tableScrollSm" style="padding-top: 0px;margin-left: 50px" >
        	 <div style = "overflow: auto; position: relative;background-color:#ddd;">
        		<table cellpadding="0" class="" name ="perantTable" id ="perantTable"  style="border: none">
                    <tr>
                        <th class="table-gszhkhwd" style="border: none"><spring:message code="shujudaima"/></th>
                        <th class="table-gszhkhmc" style="border: none"><spring:message code="shujuzhongwen"/></th>
                        <th class="table-gszhkhzh" style="border: none"><spring:message code="shujuyingwen"/></th>
                        <th class="table-gszhkhwd" style="border: none"><spring:message code="shujuriwen"/></th>
                        <th class="table-gszhkhwd" style="border: none"><spring:message code="zhuangtai"/></th>
                    </tr>
                    </table>
                      </div>
                    <div style = "overflow: auto; position: relative;background-color:#fff;border:1px solid #B7B9B8;height:252px;">
                    <table cellpadding="0" class="" name ="perantTable" id ="perantTable" >
         		<c:forEach items="${dictList}" var="dict" varStatus="status">
                    <tbody >
                    <tr>
                        <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhwd linkBox" onclick="popup('616px','407px','${ctx}/database/message/statusmessages?id=${dict.id}')">${dict.itemValue }</td>
                        <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhmc">${dict.itemNameCn }</td>
                        <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhzh">${dict.itemNameEn }</td>
                        <td style="border: none;border-bottom:1px solid #B7B9B8; border-right:1px solid #B7B9B8"; class="table-gszhkhwd">${dict.itemNameJp }</td>
                        <c:if test="${dict.enableFlag == 1}">
                        <td style="border: none;border-bottom:1px solid #B7B9B8;" class="table-gszhkhwd">启用</td>
                        </c:if>   
                         <c:if test="${dict.enableFlag == 0}">
                        <td style="border: none;border-bottom:1px solid #B7B9B8;" class="table-gszhkhwd">停用</td>
                        </c:if>     
                    </tr>
                	</tbody>
                </c:forEach>
                </table>
                <div id="hiddenHtml"></div>
             </div>
          </div>
        </div>
    </div>
</div>

</form>
<script>
</script>
</body>
</html>
